﻿using AIO.Entity.Base;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace AIO.Entity
{
    /// 设备采购
    [Table("BEC01")]
    public class EquipProcurement : BaseEntity
    {
        /// <summary>
        /// 设备名称
        /// </summary>
        [Required]
        [Column("BEC001"), MaxLength(100)]
        public string? Name { get; set; }

        /// <summary>
        /// 设备类型
        /// </summary>
        [Required]
        [Column("BEC002"), MaxLength(50)]
        public string? Style { get; set; }

        /// <summary>
        /// 设备数量
        /// </summary>
        [Required]
        [Column("BEC003"), MaxLength(50)]
        public string? Number { get; set; }

        /// <summary>
        /// 设备单价
        /// </summary>
        [Required]
        [Column("BEC004"), MaxLength(50)]
        public string? Price { get; set; }

        /// <summary>
        /// 设备单位
        /// </summary>

        [Column("BEC005")]
        [DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}"
            , ApplyFormatInEditMode = true)]
        public DateTime? PurchaseDate { get; set; }

        /// <summary>
        /// 设备金额
        /// </summary>

        [Column("BEC006")]
        [DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}"
            , ApplyFormatInEditMode = true)]
        public DateTime? ScrapDate { get; set; }

        public Department? Department { get; set; }
        public string Fault { get; internal set; }
        public string EquId { get; internal set; }
        public string Result { get; internal set; }
        public string Unit { get; internal set; }
        public string Content { get; internal set; }
    }
}
